package PTA.javaB;

import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.Scanner;

public class ex12 {
    public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Calculator a = new Calculator();
double numb1 = sc.nextDouble();
double numb2 = sc.nextDouble();
double numb = sc.nextDouble();
double x=sc.nextDouble();
        System.out.println(a.add(numb1,numb2));
        System.out.println(a.substract(numb1,numb2));
        System.out.println(a.multiply(numb1,numb2));
        System.out.println(a.divide(numb1,numb2));
        System.out.println(a.perimeter(numb));
        System.out.println(a.area(numb));
        System.out.println(a.log(x));
        Class<?> clazz = Calculator.class;
        Field[] fields = clazz.getDeclaredFields();
        Method[] methods = clazz.getDeclaredMethods();
        boolean flag=true;
        System.out.println(clazz);
        for (Field field : fields) {
            if(Modifier.isFinal(field.getModifiers())&&Modifier.isStatic(field.getModifiers())!=true)
                flag=false;
        }
        for (Method method : methods) {
            if(Modifier.isStatic(method.getModifiers())!=true)
                flag=false;
        }
        System.out.println(flag);

    }
}
class Calculator{
    final static double PI=3.14;
    final static double E=2.71828;
    public static double add(double numb1,double numb2){
        return numb1+numb2;
    }
    public static double substract(double numb1,double numb2){
        return numb1-numb2;
    }
    public static double multiply(double numb1,double numb2){
        return numb1*numb2;
    }
    public static double divide(double numb1,double numb2){
        return numb1/numb2;
    }
    public static double perimeter(double numb){
        return 2*PI*numb;
    }
    public static double area(double numb){
        return PI*numb*numb;
    }
    public static double log(double numb){
        return Math.log10(numb)/Math.log10(Calculator.E);
    }
}